package com.zlm.tools.cron;

/**
 * @author zlm
 * @date 2023/8/3
 *
 */
public class CronModel {

    Integer[] dayOfWeeks;

    Integer[] dayOfMonths;

    Integer[] months;

    Integer second;

    Integer minute;

    Integer hour;

    /**
     * 类型
     */
    JobEnum jobType;
    /**
     * 间隔
     */
    Integer beApart;

    public Integer[] getDayOfWeeks() {
        return dayOfWeeks;
    }

    public void setDayOfWeeks(Integer[] dayOfWeeks) {
        this.dayOfWeeks = dayOfWeeks;
    }

    public Integer[] getDayOfMonths() {
        return dayOfMonths;
    }

    public void setDayOfMonths(Integer[] dayOfMonths) {
        this.dayOfMonths = dayOfMonths;
    }

    public Integer[] getMonths() {
        return months;
    }

    public void setMonths(Integer[] months) {
        this.months = months;
    }

    public Integer getSecond() {
        return second == null ? 0 : second;
    }

    public void setSecond(Integer second) {
        this.second = second;
    }

    public Integer getMinute() {
        return minute == null ? 0 : minute;
    }

    public void setMinute(Integer minute) {
        this.minute = minute;
    }

    public Integer getHour() {

        return hour==null ? 0 : hour;
    }

    public void setHour(Integer hour) {
        this.hour = hour;
    }

    public JobEnum getJobType() {
        return jobType == null ? JobEnum.DAY : jobType;
    }

    public void setJobType(JobEnum jobType) {
        this.jobType = jobType;
    }

    public Integer getBeApart() {
        return beApart;
    }

    public void setBeApart(Integer beApart) {
        this.beApart = beApart;
    }
}
